package com.example.auth.mapper;

import com.example.auth.entity.SysConfig;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

@Mapper
public interface SysConfigMapper {

    /**
     * insert a new sys config
     *
     * @param sysConfig sysConfig
     * @return the rows of effect
     */
    int insert(SysConfig sysConfig);

    /**
     * delete the sys config by primary key
     *
     * @param id id
     * @return the rows of effect
     */
    int deleteByPrimaryKey(Long id);

    /**
     * update the sys config by primary key
     *
     * @param sysConfig sysConfig
     * @return the rows of effect
     */
    int updateByPrimaryKey(SysConfig sysConfig);

    /**
     * get the sys config by primary key
     *
     * @param id id
     * @return SysConfig
     */
    SysConfig selectByPrimaryKey(Long id);

    /**
     * get the sys config list by query param
     *
     * @param sysConfig sysConfig
     * @return List<SysConfig>
     */
    List<SysConfig> selectList(SysConfig sysConfig);

    /**
     * update the sys config value by key
     *
     * @param sysConfig sysConfig
     * @return 影响行数
     */
    int updateValueByKey(SysConfig sysConfig);
}
